package customHandler;


import com.springboot.frame.excel.handler.StringCellHandler;
import entity.simple.SimpleStudent;
import org.apache.commons.codec.digest.Md5Crypt;
import org.apache.poi.ss.usermodel.Cell;

public class Md5CellHandler extends StringCellHandler {

  @Override
  public String read(Cell cell, Object object) {
    SimpleStudent simpleStudent = (SimpleStudent) object;
    String str = simpleStudent.getName() + simpleStudent.getSex();
    return Md5Crypt.md5Crypt(str.getBytes());
  }

}
